package com.yanqu.road.entity.union.cross;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 商会加入额外限制，开启跨服商会的要判断商会内对应实力评定成员的数量
 */
public class CrossUnionJoinExInfo {
    private Map<Integer, Integer> gradeNumLimitMap = new ConcurrentHashMap<>();

    public Map<Integer, Integer> getGradeNumLimitMap() {
        return gradeNumLimitMap;
    }

    public void setGradeNumLimitMap(Map<Integer, Integer> gradeNumLimitMap) {
        this.gradeNumLimitMap = gradeNumLimitMap;
    }

    public int getGradeLimitNum(int grade) {
        return this.gradeNumLimitMap.getOrDefault(grade, 0);
    }
}
